import { normalizeContainer } from '../../../../../global/element/Func';
import { id_split } from '../../../DataDefine/sourceData';
import { float_info_keyVal_id } from '../DataDefine/sourceData';

const float_info_staticNodeTag = 'float_info_staticNode';

class float_info_staticNode {
  get [Symbol.toStringTag]() {
    return float_info_staticNodeTag;
  }

  constructor(props) {
    this.props = props;

    this.float_info_keyVal_dom = normalizeContainer(
      this.#fill_id(float_info_keyVal_id)
    );
  }

  /**
   * 传入数据
   * @type {{id:string,keyVal:string}}
   */
  props;

  /**
   * 浮动元素 的 id 值 dom
   * @type {HTMLElement}
   */
  float_info_keyVal_dom;

  #fill_id(prefix_cla) {
    return prefix_cla + id_split + this.props.id;
  }
}

export { float_info_staticNode };
